package com.wnnight.wys.entity.notice;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.wnnight.wys.entity.config.PropertyStaff;
import lombok.*;

import java.util.Date;

/**
 * @ClassName: Notice
 * @Description: //TODO
 * @author: xjh
 * @date: 2022/8/27-17:07
 * @version: v1.0
 */
@Getter
@Setter
@TableName("wys_notice")
@AllArgsConstructor
@NoArgsConstructor
@ToString
@ExcelIgnoreUnannotated
public class Notice {
    @TableId(type = IdType.AUTO)
    private Integer id;
    @TableField("title")
    @ExcelProperty(value = "标题",index = 0)
    private String title;//标题
    @TableField(value = "type_id",property = "noticeType.id")
    private NoticeType type;//公告类型
    @TableField("urgency")
    @ExcelProperty(value = "紧急程度",index=1)
    private String urgency;//紧急程度，日常或紧急
    @TableField("content_type")
    @ExcelProperty(value = "内容类型",index=2)
    private String contentType;//内容有文本，图文，短视频
    @TableField("create_time")
    @ExcelProperty(value = "创建时间",index=3)
    private Date createTime;//创建时间
    @TableField("read_count")
    @ExcelProperty(value = "阅读量",index=4)
    private Integer readCount;//阅读量
    @TableField("content")
    @ExcelProperty(value = "公告内容",index=5)
    private String content;//公告内容
    @TableField("status")
    private String status;//状态
    @TableField(value="staff_id",property = "propertyStaff.id")
    private PropertyStaff staff;//物业工作人员Id
    @TableField("img")
    @ExcelProperty(value = "图片路径",index = 6)
    private String img;
    @TableField("video")
    @ExcelProperty(value = "视频路径",index = 7)
    private  String video;

}
